Optimal. Leaf size=47 \[ \frac{-B+i A}{2 f (a+i a \tan (e+f x))}+\frac{x (A-i B)}{2 a} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0451566, antiderivative size = 47, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 2, integrand size = 26, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.077, Rules used = {3526, 8} \[ \frac{-B+i A}{2 f (a+i a \tan (e+f x))}+\frac{x (A-i B)}{2 a} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3526
Rule 8
Rubi steps
\begin{align*} \int \frac{A+B \tan (e+f x)}{a+i a \tan (e+f x)} \, dx &=\frac{i A-B}{2 f (a+i a \tan (e+f x))}+\frac{(A-i B) \int 1 \, dx}{2 a}\\ &=\frac{(A-i B) x}{2 a}+\frac{i A-B}{2 f (a+i a \tan (e+f x))}\\ \end{align*}
Mathematica [B] time = 0.453828, size = 102, normalized size = 2.17 \[ \frac{\cos (e+f x) (A+B \tan (e+f x)) ((A (2 f x-i)-2 i B f x+B) \tan (e+f x)-2 i A f x+A+B (-2 f x+i))}{4 a f (\tan (e+f x)-i) (A \cos (e+f x)+B \sin (e+f x))} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] time = 0.04, size = 121, normalized size = 2.6 \begin{align*}{\frac{A}{2\,af \left ( \tan \left ( fx+e \right ) -i \right ) }}+{\frac{{\frac{i}{2}}B}{af \left ( \tan \left ( fx+e \right ) -i \right ) }}-{\frac{{\frac{i}{4}}\ln \left ( \tan \left ( fx+e \right ) -i \right ) A}{af}}-{\frac{\ln \left ( \tan \left ( fx+e \right ) -i \right ) B}{4\,af}}+{\frac{B\ln \left ( \tan \left ( fx+e \right ) +i \right ) }{4\,af}}+{\frac{{\frac{i}{4}}A\ln \left ( \tan \left ( fx+e \right ) +i \right ) }{af}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: RuntimeError} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.57428, size = 108, normalized size = 2.3 \begin{align*} \frac{{\left (2 \,{\left (A - i \, B\right )} f x e^{\left (2 i \, f x + 2 i \, e\right )} + i \, A - B\right )} e^{\left (-2 i \, f x - 2 i \, e\right )}}{4 \, a f} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A] time = 0.732325, size = 88, normalized size = 1.87 \begin{align*} \begin{cases} \frac{\left (i A - B\right ) e^{- 2 i e} e^{- 2 i f x}}{4 a f} & \text{for}\: 4 a f e^{2 i e} \neq 0 \\x \left (- \frac{A - i B}{2 a} + \frac{\left (A e^{2 i e} + A - i B e^{2 i e} + i B\right ) e^{- 2 i e}}{2 a}\right ) & \text{otherwise} \end{cases} + \frac{x \left (A - i B\right )}{2 a} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] time = 1.35319, size = 122, normalized size = 2.6 \begin{align*} -\frac{\frac{{\left (i \, A + B\right )} \log \left (\tan \left (f x + e\right ) - i\right )}{a} + \frac{{\left (-i \, A - B\right )} \log \left (-i \, \tan \left (f x + e\right ) + 1\right )}{a} + \frac{-i \, A \tan \left (f x + e\right ) - B \tan \left (f x + e\right ) - 3 \, A - i \, B}{a{\left (\tan \left (f x + e\right ) - i\right )}}}{4 \, f} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]